﻿using Cudafy;
using Cudafy.Host;
using Lights.Processing;
using Lights.Types;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lights
{
    static class Global
    {
        public const int THUMBNAIL_SIZE = 128;
        public const int PREVIEW_SIZE = 512;
        public static string ModulesFolder { get { return "./Modules"; } }
        public static string Workspace { get; private set; }
        public static string CatalogFolder { get { return string.Format("{0}/Catalog", Workspace); } }
        public static Collector<Photo> PhotoCollector { get; private set; }
        public static Collector<PhotoList> CollectionCollector { get; private set; }

        public static void OpenWorkspace(string workspace)
        {
            Workspace = workspace;
            if (!Directory.Exists(workspace))
            {
                Directory.CreateDirectory(workspace);
                Directory.CreateDirectory(CatalogFolder);
            }

            PhotoCollector = new Collector<Photo>(Workspace);
            CollectionCollector = new Collector<PhotoList>(Workspace);
        }
    }
}
